package cn.well.cloud.generator.engine.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import lombok.Data;
import cn.hutool.core.util.StrUtil;

/**
 * 全局配置
 *
 * @author fengshuonan
 * @date 2017-05-08 20:21
 */
@Data
public class ContextConfig {
    
    private String templatePrefixPath = "gunsTemplate/advanced";//模板目录
    private String projectPath; //模板生成文件输出的项目目录
    private String bizChName;   //业务名称
    private String bizEnName;   //业务英文名称
    private String bizEnBigName;//业务英文名称(大写)
    private String moduleName = "modular";  //模块名称,默认“modular”,将service,dao,model定义到同一个模块下，方便开发和维护
    private String serviceName = "default"; //服务模块,用来划分前端页面
    private String author;//作者
    private String parentMenuName;//父级菜单名

    private String proPackage = "cn.well.cloud"; //包公共前缀,从各个项目的配置中读取
    private String coreBasePackage ="cn.stylefeng.roses.core";
    private String modelPackageName;        //model的包名
    private String modelMapperPackageName;  //model的mapper
    private String entityName;              //实体的名称


    public void init() {
        if (entityName == null) {
            entityName = bizEnBigName;
        }
        modelPackageName = proPackage + "." + moduleName +".model";
        modelMapperPackageName = proPackage + "." + moduleName +".mapper";
    }


    
}
